package demo10;

public class Array_class3 {

    public static void printArray(int[] array) {
//        for (int i = 0; i < array.length; i++) {
        for (int i: array) {
            System.out.println(i);
//            System.out.println(array[i]);
        }
    }

    public static void main(String[] args) {
        printArray(new int[]{3, 5, 6, 1, 8, 9, 1, 2});
    }
}
